# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pynput
_pkgname=pynput
pkgver=1.8.1
_pyver=3.13
pkgrel=1
pkgdesc='Monitor and control user input devices.'
arch=('any')
url='https://pypi.org/project/pynput/#files'
license=('GPL')
depends=('python' 'python-six')
makedepends=('python-setuptools' 'python-pip' 'python-wheel')
options=(!emptydirs)
source=("https://github.com/moses-palmer/pynput/archive/refs/tags/v$pkgver.tar.gz")
sha512sums=('112018ed624cfbe0161b1ae957942c2c02c62ee9db19a58012037a423e3c213b635673782b12d1df4ca235b4ce9ad27f7ad947bacb8263607bce580e8c8a2ab5')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package_python-pynput() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  chmod 644 \
    "$pkgdir/usr/lib/python$_pyver/site-packages/$_pkgname-$pkgver-py$_pyver.egg-info/"*
}

